import json

data = {
    "name": "张三",
    "age": 18,
    "hobby": ["reading", "swimming", "coding"],
    "is_male": True,
    "score": 100.0,
    "gender": None
}

with open("./resources/excels/data.json", "w", encoding="utf-8") as f:
    json.dump(data, f, ensure_ascii=False, indent=4)

print("json文件保存成功！")